<%--
  Created by IntelliJ IDEA.
  User: w1057229265
  Date: 2021/6/20
  Time: 15:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="../static/plugins/jquery-easyui-1.9.15/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../static/plugins/jquery-easyui-1.9.15/themes/icon.css">
    <script type="text/javascript" src="../static/plugins/jquery-easyui-1.9.15/jquery.min.js"></script>
    <script type="text/javascript" src="../static/plugins/jquery-easyui-1.9.15/jquery.easyui.min.js"></script>
    <script>
        $(function (){
            loadData('')

            $('#BtnQuery').textbox({
                onClickButton:function (){
                    alert($(this).val())
                    loadData($(this).val())
                }
            })
            function  loadData(val){

                $('#dg').datagrid({
                    url: '/ServletBook?action=getdglist6',
                    toolbar: '#tb',
                    pagination: true,
                    fit: true,
                    singleSelect: true,
                    queryParams: {
                        bname: val
                    },
                    columns: [[
                        {field: 'bid', title: '书码', width: 100},
                        {field: 'bname', title: '书名称', width: 100},
                        {field: 'bprice', title: '价格', width: 100},
                        {field: 'bimage', title: '仓库', width: 300},
                        {field: 'bargainer', title: '特价', width: 100},
                        {field: 'isHot', title: '最新', width: 100},
                        {field: 'bpdesc', title: '介绍', width: 100},
                        {field: 'cid', title: '类型'}
                    ]]
                });
            }
        })
    </script>
</head>
<body class="easyui-layout">
<div data-options="region:'center',border:false">
    <table id="dg">

    </table>
</div>
<div id="dd"></div>
<div id="tb" style="height:auto">

            <td>
                <input id="BtnQuery" class="easyui-textbox" data-options="buttonText:'查询',buttonAlign:'right',buttonIcon:'icon-search',prompt:'名称'" style="width:280px;">
            </td>
        </tr>
    </table>
</div>
</body>
</html>

